package com.example.demo;

public class MyFormat {
    int i1 = 1;
    long l1 = 2;
    float f1 = 3.0f;
    double d1 = 4.0;

    public String toString() {
        String s1 = String.format("%d - %d - %.2f - %.2f", i1, l1, f1, d1);
        return s1;
    }

    public static void main(String[] args) {
        System.out.print(new MyFormat());
    }
}
